package com.pkx.cloud.fse7.dms.openrecord.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.pkx.cloud.fse7.dms.openrecord.entity.OpenRecordView;
import com.pkx.cloud.fse7.dms.openrecord.repo.OpenRecordViewMapper;
import com.pkx.cloud.fse7.dms.openrecord.service.OpenRecordViewService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 *  服务实现类
 *
 * @author chenwg
 * @since 2020-10-14
 */
@Service
public class OpenRecordViewServiceImpl extends ServiceImpl<OpenRecordViewMapper, OpenRecordView> implements OpenRecordViewService {

    /**
     * 分页列表
     *
     * @param openRecordView
     * @return
     */
    @Override
    public Page<OpenRecordView> pageList(Page page, OpenRecordView openRecordView) {
        LambdaQueryWrapper<OpenRecordView> lambdaQueryWrapper = Wrappers.lambdaQuery(OpenRecordView.class);
        return page(page, lambdaQueryWrapper);
    }

    /**
     * 列表查询
     *
     * @param openRecordView
     * @return
     */
    @Override
    public List<OpenRecordView> listByEntity(OpenRecordView openRecordView) {
        LambdaQueryWrapper<OpenRecordView> lambdaQueryWrapper = Wrappers.lambdaQuery(OpenRecordView.class);
        return list(lambdaQueryWrapper);
    }

    /**
     * 详情
     *
     * @param id
     * @return
     */
    @Override
    public OpenRecordView selectById(Long id) {
        return getById(id);
    }

}
